<<<<<<< HEAD
<template>
  <div>
    <el-table :data="list" style="width: 100%">
      <el-table-column prop="storeName" label="商家名称" width="180">
      </el-table-column>
      <el-table-column prop="storePhone" label="商家电话" width="180">
      </el-table-column>
      <el-table-column prop="storeLogo" label="商家logo">
        <template slot-scope="scope">
          <el-image
            style="width: 100px; height: 100px"
            :src="scope.row.storeLogo"
          ></el-image>
        </template>
      </el-table-column>
      <el-table-column prop="storeType" label="商家类型">
        <template slot-scope="scope">
          <el-tag v-if="scope.row.storeType === 1">汽车4s店</el-tag>
          <el-tag v-else-if="scope.row.storeType === 2">汽车修理厂</el-tag>
        </template>
      </el-table-column>
      <el-table-column prop="serveName" label="负责人名称"> </el-table-column>
      <el-table-column prop="servePhone" label="负责人电话"> </el-table-column>
      <el-table-column prop="address" label="商家地址"> </el-table-column>
      <el-table-column prop="address" label="操作">
        <template slot-scope="scope">
          <el-button size="mini" type="primary" @click="open(scope.row)"
            >详情</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <!-- 详情弹框 -->
    <el-dialog
      title="商家详情"
      :visible.sync="centerDialogVisible"
      width="50%"
      center
    >
      <el-descriptions class="margin-top" :column="3" border>
        <el-descriptions-item>
          <template slot="label"> 商家名称 </template>
          {{ query.storeName }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 商家类型 </template>
          <el-tag v-if="query.storeType === 1">汽车4s店</el-tag>
          <el-tag v-else-if="query.storeType === 2">汽车修理厂</el-tag>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 商家logo </template>
          <!-- {{ query.storeLogo }} -->
          <el-image
            style="width: 100px; height: 100px"
            :src="String(query.storeLogo)"
          ></el-image>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 商家地址 </template>
          {{ query.address }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 商家电话 </template>
          {{ query.servePhone }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 商家门头 </template>
          <!-- {{  String(query.frontDoor) }} -->
          <el-image
            style="width: 100px; height: 100px"
            :src="String(query.frontDoor)"
          ></el-image>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 营业执照 </template>
          <!-- {{ query.bizLicense }} -->
          <el-image
            style="width: 100px; height: 100px"
            :src="String(query.bizLicense)"
          ></el-image>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 负责人姓名 </template>
          {{ query.masterName }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 负责人电话 </template>
          {{ query.storePhone }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 商务经理 </template>
          {{ query.serveName }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 商务电话 </template>
          {{ query.servePhone }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label"> 申请时间 </template>
          {{ query.updateDate }}
        </el-descriptions-item>
      </el-descriptions>
    </el-dialog>

    <!-- 分页 -->
    <el-pagination background layout="prev, pager, next" :total="1000" @current-change="handleCurrentChange">
    </el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      query: {
        pageNum: 1,
        pageSize: 10,
      },
      centerDialogVisible: false,
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      this.$http
        .get("/merchant/getMerchants", { params: this.query })
        .then((res) => {
          console.log(res);
          this.query = res.data.object.list;
          this.list = res.data.object.list;
        });
    },
    open(row) {
      this.query = row;
      this.centerDialogVisible = true;
    },
    handleCurrentChange(val){
        this.query = {}
        this.query.pageNum = val
        this.query.pageSize = 10
        this.init()
    }
  },
};
</script>

<style lang="scss" scoped>
=======
<template>
    <div>
        商家列表
    </div>
</template>

<script>
    export default {
        
    }
</script>

<style lang="scss" scoped>

>>>>>>> cc
</style>